package fr.ssd.sdl.loader;

import java.io.IOException;

/**
 * This class is a vanilla implementation of the Loader interface. This
 * implementation require one sql statement per line.
 * 
 * @see Loader
 * @author Sylvain Sicard
 * 
 */
public class SimpleSqlLoader extends AbstractSqlLoader {

	@Override
	public String loadSqlStatement() throws LoaderException {
		String line;
		do {
			try {
				line = r.readLine();
			} catch (IOException e) {
				throw new LoaderException(e);
			}
		} while (line != null && line.startsWith(lineCommentToken));
		return line;
	}
}
